#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QIcon icon(":/icon/enemy");
    ui->pushButton->setIcon(icon);
    ui->pushButton->setIconSize(QSize(50,50));

    QIcon icon_up(":/icon/up");
    ui->pushButton_up->setIcon(icon_up);


}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_up_clicked()
{
    QRect rect = ui->pushButton->geometry();
    ui->pushButton->setGeometry(rect.x(),rect.y() - 5 ,rect.width() ,rect.height());
}
